Template Function cereal::save(Archive&, const cv::Mat&)
Defined in File mat_cerealisation.h
Function Documentation
-
template<class Archive, cereal::traits::DisableIf<cereal::traits::is_text_archive<Archive>::value> = cereal::traits::sfinae>
void cereal::save(Archive &ar, const cv::Mat &mat) Serialise a cv::Mat using cereal.
Serialise a cv::Mat using cereal, for text archives (JSON specifically).
Supports all types of matrices as well as non-contiguous ones.
Experimental: This specialisation is enabled for text archives (e.g. XML, JSON), and was created to convert the JSON output from the BFM Matlab converter script to a cereal binary model.
Notes:
Only for 2-dim matrices, and float values, i.e. CV_32FC1 cv::Mat’s. Actually, only 32FC1, because of the load() method. In fact, maybe we should store the type, since we’re storing cv::Mat’s.
Writes the data row-wise to a json array? or a json object?
- Parameters
ar – [in] The archive to serialise to.
mat – [in] The matrix to serialise.
ar – [in] The archive to serialise to.
mat – [in] The matrix to serialise.